<?php

/**
 * FRAMEWORK
 */

/**
 * Define application folder
 */
$application = 'application';

/**
 * Define Root
 */
define('ROOT', str_replace("\\", "/", realpath(dirname(__FILE__))));

/**
 * Define base path
 */
define('BASEPATH', ROOT . '/' . $application . '/');

/**
 * Call Router
 */
require_once BASEPATH . 'core/router.php';
$router = new Router();

/**
 * Do request
 */
$router->do_request();

/**
 * Show error
 * @param string $message
 */
function show_error($message = '') {
    // Write error message
    $error = '404 - Page not found';
    $error .= "<br /> $message";
    exit($error);
}

?>
